package com.android.aishangauction.adapt;

import android.text.SpannableString;
import android.text.Spanned;
import android.text.style.AbsoluteSizeSpan;
import android.widget.ImageView;

import com.android.aishangauction.utils.ObjectUtils;
import com.android.aishangauction.R;
import com.android.aishangauction.model.member.CollectListGoodsData;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

/**
 * Created by Administrator on 2016/8/10.
 */
public class listMineCollectAdapt extends BaseQuickAdapter<CollectListGoodsData.MineCollectData.MineCollectdata, BaseViewHolder> {

    public listMineCollectAdapt(int layoutResId, List<CollectListGoodsData.MineCollectData.MineCollectdata> data) {
        super(layoutResId, data);

    }


    @Override
    protected void convert(BaseViewHolder helper, CollectListGoodsData.MineCollectData.MineCollectdata listBean) {


        ObjectUtils.photo(mContext, listBean.getGoods_thumb(), ((ImageView) helper.getView(R.id.item_list_mine_collect_img)));
        SpannableString msp = new SpannableString("￥" + listBean.getGoods_team_price());
        msp.setSpan(new AbsoluteSizeSpan(10, true), 0, 1, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
        helper.setText(R.id.item_list_mine_collect_title, listBean.getGoods_name());
        helper.setText(R.id.item_list_mine_collect_money, msp);
        helper.setText(R.id.item_list_mine_collect_tuanshu, listBean.getGoods_team_num() + "人团");
        helper.addOnClickListener(R.id.item_list_mine_collect_kaituan_ll);
        helper.addOnClickListener(R.id.item_list_mine_collect_collect);


    }


}
